<%@ page import="java.util.ArrayList" %>
<%@ page import="com.example.bean.Student" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        table{
            border: 1px solid #000;
            border-collapse: collapse;
            width: 600px;
        }
        td,th{
            border: 1px solid #000;
        }
    </style>

</head>

<body>

    <%--jsp 输出一个表格，里面有 10 个学生信息。--%>
    <%
    ArrayList<Student> studentList = (ArrayList<Student>) request.getAttribute("stuList");
    %>

    <table>
        <tr>
            <td>编号</td>
            <td>姓名</td>
            <td>年龄</td>
            <td>电话</td>
            <td>操作</td>
        </tr>
    <%
        for (Student student : studentList) {
    %>
        <tr>
            <td><%=student.getId()%></td>
            <td><%=student.getName()%></td>
            <td><%=student.getAge()%></td>
            <td><%=student.getPhone()%></td>
            <td>删除、修改</td>
        </tr>
    <%
        }
    %>
    </table>
</body>

</html>
